import React, { useState } from 'react'

export default function TwoWay() {
    const [value, setValue] = useState('')
    return (
        <div>
            <h1>双向绑定</h1>
            <p>当前的值：{value}</p>
            <input
            type="text"
            onChange={(e) => setValue(e.target.value)}
            />
        </div>
    )
}
